package m;

public class Student {
	Person person;
	String id;
	Department dep;
	CGPA cgpa;
	final String kind = "student";

	public String getKind() {
		return kind;
	}

	public Student(String name, String sn, String id2, String gender) {
		setId(id2);
		setPerson(new Person(name, sn, gender));
	}

	public Department getDep() {
		return dep;
	}

	public CGPA getGpa() {
		return cgpa;
	}

	public String getId() {
		return id;
	}

	public Person getPerson() {
		return person;
	}

	public void setDep(Department dep) {
		this.dep = dep;
	}

	public void setGpa(CGPA cgpa) {
		this.cgpa = cgpa;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setPerson(Person person) {
		this.person = person;
	}

	@Override
	public String toString() {
		String str = "";
		// str += "data_type: " + getKind() + "\nname: " + getPerson().getName()
		// + "\nsn: " + getPerson().getSn() + "\ngender: "
		// + person.getGender() + "\nid: " + getId();
		str = String
				.format("data_type:\t%s\nname:\t\t%s\nsn:\t\t%s\ngender:\t\t%s\nid:\t\t%s\n---------------------------------------",
						getKind(), getPerson().getName(), getPerson().getSn(),
						getPerson().getGender(), getId());
		return str;
	}
}
